IF EXISTS (SELECT * FROM dbo.sysobjects where name='TG_DEANPHANCONG')
begin
		drop TRIGGER TG_DEANPHANCONG
end
go

CREATE TRIGGER TG_DEANPHANCONG
ON DEAN FOR DELETE
AS
BEGIN
		declare @MADA_del int
		select @MADA_del=MADA
		from deleted

		delete from DEAN where @MADA_del=MADA
END